package com.diaohw.module.metadata.obj.convert;

import com.diaohw.module.metadata.obj.dto.MetaRelationshipDTO;
import com.diaohw.module.metadata.obj.entity.MetaRelationshipDO;
import com.diaohw.module.metadata.obj.vo.MetaRelationshipVO;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * <p>
 * 元数据分组关联关系表 类型转换
 * </p>
 *
 * @author D-Hw
 * @since 2025-04-07
 */
@Mapper
public interface MetaRelationshipConvert {

    MetaRelationshipConvert INSTANCE = Mappers.getMapper(MetaRelationshipConvert.class);

    /**
     * dto to entity
     */
    @InheritConfiguration
    MetaRelationshipDO dtoToEntity(MetaRelationshipDTO dto);

    /**
     * entity to dto
     */
    @InheritConfiguration
    MetaRelationshipDTO entityToDto(MetaRelationshipDO entity);

    /**
     * entity to dto
     */
    @InheritConfiguration
    MetaRelationshipVO entityToVo(MetaRelationshipDO entity);

    /**
     * entity to dto
     */
    @InheritConfiguration
    List<MetaRelationshipVO> entityToVo(List<MetaRelationshipDO> list);


}

